//
//  BKPhone_NumberView.h
//  bestkeep
//
//  Created by yons on 16/11/25.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AddressBook/AddressBook.h>
@class BKPhone_NumberView;
typedef void(^Complete)(ABRecordRef person, NSString *phoneNumber);


@protocol PhoneNumberTextFiledDelegate <NSObject>
- (void)phoneCardsNumberView:(BKPhone_NumberView *)phoneNumberView textValueChanged:(UITextField *)textField;
- (void)phoneCardsNumberView:(BKPhone_NumberView *)phoneNumberView textFieldShouldEndEditing:(UITextField *)textField;
- (void)phoneCardsNumberView:(BKPhone_NumberView *)phoneNumberView textFieldShouldBeginEditing:(UITextField *)textField;

@end

@protocol AddContactPeopleDelagate <NSObject>

@required
-(void)addContactPerson:(BKPhone_NumberView *)view chooseContactPeople:(Complete)complete;
- (void)updateDataFromServerPhoneNumber:(NSString *)phoneNumber numberInfo:(NSString *)numberInfo;
- (void)finishKeyBoardAction:(UIButton *)sender;
- (void)cancleKeyBoardAction:(UIButton *)sender;

@end

@interface BKPhone_NumberView : UIView

@property(nonatomic,strong)UITextField *phoneTextField;
@property(nonatomic,strong)UILabel *QCellCoreLabel;
@property(nonatomic,strong)UIImageView *contactImageView;
@property (nonatomic, weak) id <AddContactPeopleDelagate> delegate;

@property (nonatomic, weak) id <PhoneNumberTextFiledDelegate> PhoneNumberdelegate;

- (NSString *)formattingPhoneNumber:(NSString *)text;
@end
